window.alertTips=function(title,txt){

    //创建遮罩层
    var tipsLayer=document.createElement("div");
    tipsLayer.className="alertTips-layer";

    //创建弹窗窗口
    var alertBox=document.createElement("div");
    alertBox.className="alertTips-alert-box";

    //创建窗口里的内容
    var alertContent='<div class="alertTips-top-box"><span>'+title+'</span><a href="javascript:void(0);" οnclick="doOk();"></a></div>';
    alertContent+='<div class="alertTips-center-box">'+txt+'</div>';
    alertContent+='<div class="alertTips-bottom-box"><button class="bg-blue" οnclick="doOk();">确定</button></div>';
    alertBox.innerHTML=alertContent;


    document.body.appendChild(tipsLayer);
    document.body.appendChild(alertBox);

    //隐藏提示框函数
    this.doOk=function(){
        tipsLayer.parentNode.removeChild(alertBox);
        tipsLayer.parentNode.removeChild(tipsLayer);
    }
}